﻿using System;
using YArchitech.LIB;

namespace HYElectricSetting
{
	public class CableTrayFittingDataInfo
	{
		public static void SetValueForFamilyObject(FittingSelectData familyObject, ListItem item)
		{
			bool flag = familyObject == null || item == null || item.Value == "";
			if (!flag)
			{
				bool flag2 = item.Name == "Id";
				if (flag2)
				{
					familyObject.Id = Convert.ToInt32(item.Value);
				}
				else
				{
					bool flag3 = item.Name == "Name";
					if (flag3)
					{
						familyObject.Name = item.Value;
					}
					else
					{
						bool flag4 = item.Name == "Family";
						if (flag4)
						{
							familyObject.Family = item.Value;
						}
						else
						{
							bool flag5 = item.Name == "Image";
							if (flag5)
							{
								familyObject.Image = item.Value;
							}
							else
							{
								bool flag6 = item.Name == "Image2D";
								if (flag6)
								{
									familyObject.Image2D = item.Value;
								}
								else
								{
									bool flag7 = item.Name == "Version";
									if (flag7)
									{
										familyObject.Version = Convert.ToInt32(item.Value);
									}
									else
									{
										bool flag8 = item.Name == "Category";
										if (flag8)
										{
											familyObject.Category = Convert.ToInt32(item.Value);
										}
										else
										{
											bool flag9 = item.Name == "SubCategory";
											if (flag9)
											{
												familyObject.SubCategory = Convert.ToInt32(item.Value);
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
